home *** CD-ROM | disk | FTP | other *** search
/ DOpus Plus / DOpus Plus.iso / Tutorial / C Guide / Simple_Module1 / smakefile < prev   
Makefile  |  1998-09-20  |  3KB  |  114 lines

  1.  
  2. # Makefile for a sample Opus 5 module
  3. # This is based on the structure of the real Opus makefile, but may be
  4. # adapted as you see fit
  5.  
  6. # Declare some variables, so we must not change multiple lines
  7. # Object files for this module
  8.  
  9. EXAMPLEOBJS   =  modinit.o ModuleEntry.o buildinstrings.o
  10.  
  11. # You should always have the modinit.o on the first place. After this
  12. # there should be your file with the L_ModuleEntry() function. All other
  13. # may follow like you want...
  14.  
  15.  
  16. # Library-Name/-Version/-Revision
  17. # use only lowercase for the name of the module
  18.  
  19. MODULENAME    = example.module
  20. EXAMPLEVER    = 56
  21. EXAMPLEREV    = 0
  22.  
  23.  
  24. # Compiler options
  25. CCOPTS =  noversion optimize def DATATYPES
  26.  
  27. # def DATATYPES is used to turn all datatypes.library related stuff on.
  28. # It is just the same as you write in the header #define DATATYPES ...
  29.  
  30. # Linker options
  31. SLINKOPTS = noicons smallcode smalldata
  32.  
  33.  
  34. #######################################################################
  35.  
  36. # If you have "ALL" in the tooltypes of your "Build" icon, this objects
  37. # will be created...
  38.  
  39. ALL: includes/buildin.strings $(MODULENAME)
  40.  
  41. #######################################################################
  42.  
  43. # Note to the line starting with "lib" :
  44. # The last entry is an object library created by Dirk Stoecker. This
  45. # does supply some replacements for the string.h and some other stuff
  46. # (in conclusion with sdi_std.h)
  47. # This results in smaller code. It is your choice ...
  48. # It does require here that you have installed it to your SC: dir.
  49. # If you don't want use it, delete "lib:sdi_std.lib", but you must
  50. # include instead the "string.h" (if you need their functions).
  51.  
  52. # Do not modify other stuff here !!!
  53.  
  54. $(MODULENAME): $(EXAMPLEOBJS) smakefile scoptions
  55.                slink with <<
  56. libprefix _L_
  57. libfd modules.fd
  58. from lib:libent.o lib:libinit.o $(EXAMPLEOBJS)
  59. to $@
  60. lib lib:sc.lib lib:amiga.lib lib:dopuslib.lib lib:sdi_std.lib
  61. libversion $(EXAMPLEVER)
  62. librevision $(EXAMPLEREV)
  63. $(SLINKOPTS)
  64. <
  65.  
  66. #######################################################################
  67.  
  68. # This will create the string file
  69.  
  70. buildinstrings.o : includes/buildin.strings
  71.                    setdate buildinstrings.c
  72.                    sc buildinstrings.c
  73. #
  74.  
  75. ModuleEntry.o: ModuleEntry.c includes/Project.h
  76.  
  77. #
  78.  
  79. modinit.o: modinit.c
  80.  
  81. #######################################################################
  82.  
  83. # Build what from what and how...
  84.  
  85. .c.o:
  86.              sc $(CCOPTS) $*.c
  87. .asm.o:
  88.              sc:c/asm -iASMINC: $*.asm
  89. .cd.strings:
  90.              catcomp descriptor=$*.cd cfile=$*.strings
  91.  
  92. #######################################################################
  93.  
  94. # Done only if the tooltype CLEAN is supplied ...
  95.  
  96. clean:
  97.          delete ~(\#?_strings).o quiet
  98.          copy *.module DOpus5:modules
  99.          setdate \#?.cd
  100.  
  101. #######################################################################
  102.  
  103. # My choice :-) (, but first "ALL" )
  104.  
  105. copy:
  106.         copy *.module DOpus5:modules
  107.         wait 5
  108.         avail flush
  109.  
  110. #######################################################################
  111.  
  112.  
  113.  
  114.